package com.czk.scala.chapter04

/**
 * @Author:ChenZhangKun
 * @Date: 2021/12/7 16:06
 */
object Test03_WhileLoop {
  def main(args: Array[String]): Unit = {
    var a: Int = 10
    while (a >= 1) {
      println(a)
      a -= 1
    }

    var b: Int = 0
    // 至少会输出一次
    do {
      println(b)
      b -= 1
    } while (b > 0)


  }


}
